#include "light.h"


light::light(IDirect3DDevice9 *d3ddev)
{
	ZeroMemory(&mlight, sizeof(mlight));   
	mlight.Type = D3DLIGHT_DIRECTIONAL;
	mlight.Diffuse = D3DXCOLOR(0.5f, 0.5f, 0.0f, 1.0f);    // licht color
	mlight.Direction = D3DXVECTOR3(0.0f, 0.0f, -1.0f);


	d3ddev->SetLight(0, &mlight);    
	d3ddev->LightEnable(0, TRUE);    

	ZeroMemory(&material, sizeof(D3DMATERIAL9));    
	material.Diffuse = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);    // set diffuse 
	material.Ambient = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);    // set ambient

	d3ddev->SetMaterial(&material);    // set the globably-used material to &material
}


light::~light()
{
}
